﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace XiaoGang.Soft.XGWMS.UI
{
    public class SelectedGoods
    {
        public SelectedGoods()
        {
            SelectedItems = new List<MODEL.MOD_M007_GOODS>();
        }

        /// <summary>
        /// 所选商品
        /// </summary>
        public List<MODEL.MOD_M007_GOODS> SelectedItems
        {
            get;
            set;
        }

        /// <summary>
        /// 清空项目
        /// </summary>
        public void ClearItems()
        {
            SelectedItems.Clear();
        }

        /// <summary>
        /// 添加项目
        /// </summary>
        /// <param name="Goods"></param>
        public void AddItem(MODEL.MOD_M007_GOODS Goods)
        {
            if (!SelectedItems.Contains(Goods))
            {
                SelectedItems.Add(Goods);
            }
        }

        /// <summary>
        /// 项目个数
        /// </summary>
        public int ItemCount
        {
            get { return SelectedItems.Count; }
        }
    }
}
